<?php include($this->view_path('common/header'));?>
<div class="g-bd f-cb">
    <div class="g-mn">
<table class="m-table m-table-row">
    <thead>
        <tr><th >标题</th><th class="colb">资源文件</th><th>文件格式</th><th class="colc">外链地址</th><th>生成时间</th></tr>
    </thead>
    <tbody>
       <?php foreach ($datas as $row)
{
	$filesinfo=get_headers(__UPLOAD__.'/'.$row->files);
	
?>
        <tr><td><a title="打开详细内容" href="<?php    echo __INDEX__.'/code.show/'.$row->id; ?>"><?php    echo $row->title; ?></a></td><td class="colb"><a title="下载资源" href="<?php    echo __UPLOAD__.'/'.$row->files; ?>"><?php    echo $row->files; ?>&nbsp;&nbsp;(<?php echo (int)(substr($filesinfo[4],16)/1024);?>KB)</a></td><td><?php echo substr($filesinfo[3],13);?></td><td><input type="input" id="<?php echo $row->id;?>" class="m-input" value="<?php    echo __UPLOAD__.'/'.$row->files; ?>"><a href="#" alt="<?php    echo __UPLOAD__.'/'.$row->files; ?>" onclick="return copy(this.getAttribute('alt'),<?php echo $row->id;?>);">复制</a></td><td><?php    echo $row->ptime; ?></td></tr>
<?php }?>
    </tbody>
</table>
<p><?php echo $pagebreak;?></p>
    </div>
    <div class="g-sd">
        
    </div>
</div>
<script type="text/javascript" src="<?php echo __JS__;?>/copy.js"></script>
<script type="text/javascript">
function copy(txt,id){
	document.getElementById(id).select();
	if(copyToClipboard(txt)) ;
	else
		alert("请手动Ctrl+V复制");
}

</script>
<?php include($this->view_path('common/footer'));?>